package com.gmail.pnk087;

/**
 * Created by IntelliJ IDEA.
 * User: khanhpham
 * Date: 6/23/12
 * Time: 12:06 AM
 * To change this template use File | Settings | File Templates.
 */
public class Template {
   private String variableValue;
   private String templateText;

   public Template(String templateText) {
      this.templateText = templateText;
   }

   public void setName(String name, String value) {
      variableValue = value;
   }

   public String evaluate() {
      return templateText.replaceAll("\\$\\{name\\}", variableValue);
   }
}
